<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    <script src="/js/jquery-3.3.1.min.js"></script>

    <script src="/ueditor/third-party/jquery-1.10.2.js"></script>
    <!-- 配置文件 -->
    <script src="/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script src="/ueditor/ueditor.all.js"></script>
    <script src="/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="/ueditor/ueditor.parse.js"></script>

</head>
<body>

<div align="center">
    <br><br><br><br>
    <textarea id="faq_edit" type="text" style="height: 500px; width: 1000px;"></textarea>
</div>


    <script type="application/javascript">

        layui.define(function () {
            let ue = UE.getEditor('faq_edit');

            //自定义请求地址
            UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
            UE.Editor.prototype.getActionUrl = function(action) {
                if (action === 'uploadimage' || action === 'uploadvideo' || action === 'uploadfile') {
                    return this._bkGetActionUrl.call(this, action);
                } else if (action === 'uploadscrawl') {
                    return '/ueditor/uploadscrawl?action=uploadscrawl';
                } else if (action === 'listimage') {
                    return '/ueditor/listimage?action=listimage';
                }else if (action === 'listfile') {
                    return '/ueditor/listfile?action=listfile';
                }else  {
                    return this._bkGetActionUrl.call(this, action);
                }
            }
        });
    </script>

</body>
</html>